<?php

/**
 * 
 * @author yuxun
 *
 */
class MatchCrossServerController extends AdminBaseController {

	public function index(){
		$this->setTitle('匹配跨服列表');
	
		$filter = new PubFilter();
		$grid   = new PubGrid();
	
		$filter->addFilter('cross_server_name', 'input', '跨服名称');
	
		$params = $filter->get();
		$page = $this->R('page', '1');
		$m = $this->R('m');
		$params['m'] = $m;
		$header = MatchCrossServerService::indexHeader();
		if(PubFunc::isAjax()){
			$result = MatchCrossServerService::indexData($params);
			$this->out = array(
					'count'     => $result['count'],
					'data'      => $result['data'],
					'result'    => true
			);
			$this->outType = 'json';
		}else{
			$order  = 'create_time';
			$url = PubFunc::ajaxUrl("?r=matchCrossServer/index", $params);
			$grid->addGrid($header, $url, array(
					'name'=>'数据',
					'order'=>array($order, 'desc'),
					'type'=>'matchCrossServer/index',
					'page'=>$page
			));
	
			$this->out['filter'] = $filter->show();
			$this->out['grid'] = $grid->show();
	
		}
	}
	

    
    
    
   
    
    
    
    
}